﻿namespace Quail
{
    /// <summary>
    /// Interface for all Quail controls
    /// </summary>
    public interface IQuailControl
    {
        /// <summary>
        /// Gets a value indicating whether this <see cref="IQuailControl"/> is visible.
        /// </summary>
        /// <value><c>true</c> if visible; otherwise, <c>false</c>.</value>
        bool Visible { get; }

        /// <summary>
        /// Gets a value indicating whether this <see cref="IQuailControl"/> is exists.
        /// </summary>
        /// <value><c>true</c> if exists; otherwise, <c>false</c>.</value>
        bool Exists { get; }

        /// <summary>
        /// Gets a value indicating whether this <see cref="IQuailControl"/> is enabled.
        /// </summary>
        /// <value><c>true</c> if enabled; otherwise, <c>false</c>.</value>
        bool Enabled { get; }

        /// <summary>
        /// Gets or sets the selector.
        /// </summary>
        /// <value>The selector.</value>
        string Selector { get; set; }

        /// <summary>
        /// Gets the page.
        /// </summary>
        /// <value>The page.</value>
        WebPage Page { get; }

        /// <summary>
        /// Gets the browser.
        /// </summary>
        /// <value>The browser.</value>
        WebBrowser Browser { get; }

        /// <summary>
        /// Gets the active task.
        /// </summary>
        /// <value>The active task.</value>
        Task ActiveTask { get; }

        /// <summary>
        /// Gets the parent control.
        /// </summary>
        /// <value>The parent control.</value>
        IQuailControl ParentControl { get; }
    }
}
